import axios from 'axios';
import type { CommonRes } from './commonType'

export interface ClueWorkObj{
  civil_servant: string,
  public_institution: string,
  private_corporation: string,
  tate_corporation: string
}

export interface ClueProductCluePlanObj{
  not_communicated: string,
  different_location_order: string,
  not_connected: string,
  connected_no_intent: string,
  connected_with_intent: string,
  invalid_number: string,
  connected_and_added: string,
  premium_user: string,
  other: string
}


export interface ClueObj {
  baitiao_quota: string[],
  work: ClueWorkObj,
  product_clue_plan: ClueProductCluePlanObj,
  stage: any,
  baitiao_quota_v2: any,
  huabei_quota_v2: any,
  credit_status_v2: any,
  credit_status: any,
}

export interface ChannelObj {
  type: any
}

export interface CityObj {
  value: string,
  label: string,
  children?: CityObj[]
}


export interface ConfigData {
  clue: ClueObj,
  channel: ChannelObj,
  v: string,
  city: CityObj,
} 



/**
 * 通用配置
 * @returns 
 */
export function getCurrentConfig() {
  return axios.post<ConfigData>('/organization/Config/current');
}
